package org.dean.webapps.projectname.utils;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Locale;

/**
 * Created by IntelliJ IDEA.
 * User: dean
 * Date: 8/29/11
 * Time: 8:41 PM
 * To change this template use File | Settings | File Templates.
 */
public class MessageUtils {
    public static String getMessage(String messageKey, String... params){
        ApplicationContext context = new ClassPathXmlApplicationContext("application-context.xml");
        String message = context.getMessage(messageKey, params, Locale.getDefault());
        return message;
    }
}
